//
//  WZXSectionView.m
//  WWLNetease
//
//  Created by dllo on 15/12/31.
//  Copyright © 2015年 Echo.Jobs. All rights reserved.
//

#import "WZXSectionView.h"

@implementation WZXSectionView

- (instancetype) initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        [self createSubView];
        
    }
    
    return self;
}


- (void)createSubView {
    
    
    /* 创建提问数量的label */
    self.questionLabel = [[UILabel alloc] initWithFrame:CGRectMake(5 * SIZE, 5 * SIZE, 55 * SIZE, 25 * SIZE)];
//    self.questionLabel.backgroundColor = [UIColor colorWithRed:0.504 green:0.000 blue:0.000 alpha:1.000];
    
    self.questionLabel.textColor = [UIColor colorWithRed:0.631 green:0.635 blue:0.631 alpha:1.000];
    self.questionLabel.font = [UIFont systemFontOfSize:14 * SIZE];
    [self addSubview:self.questionLabel];
    
    /* 创建两个label中间的点 */
    self.pointLabel = [[UILabel alloc] initWithFrame:CGRectMake(65 * SIZE, 5 * SIZE, 10 * SIZE, 15 * SIZE)];
    self.pointLabel.text = @".";
    self.pointLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.pointLabel];
    
    /* 创建回答的数量 */
    self.answerLabel = [[UILabel alloc] initWithFrame:CGRectMake(82.5 * SIZE, 5 * SIZE, 55 * SIZE, 25 * SIZE)];
//        self.answerLabel.backgroundColor = [UIColor redColor];
    self.answerLabel.textColor = [UIColor colorWithRed:0.631 green:0.635 blue:0.631 alpha:1.000];
    self.answerLabel.font = [UIFont systemFontOfSize:14 * SIZE];
    [self addSubview:self.answerLabel];
    
    /* 创建最热Label */
    self.hotLabel = [[UILabel alloc] initWithFrame:CGRectMake(300 * SIZE, 2.5 * SIZE, 55 * SIZE, 30 * SIZE)];
    self.hotLabel.backgroundColor = [UIColor colorWithRed:0.784 green:0.090 blue:0.133 alpha:1.000];
    self.hotLabel.textColor = [UIColor whiteColor];
    self.hotLabel.textAlignment = NSTextAlignmentCenter;
    self.hotLabel.font = [UIFont systemFontOfSize:18 * SIZE];
    self.hotLabel.text = @"最热";
    self.hotLabel.layer.masksToBounds = YES;
    self.hotLabel.layer.cornerRadius = 5 * SIZE;
    [self addSubview:self.hotLabel];
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
